Skip to content

Conversation

@felixgateru
Copy link
Contributor

What type of PR is this?

This is a feature as it adds support for private and public metadata for Users and Clients

What does this do?

This pr:

  • adds a database column for public metadata and subsequent changes to Users and Clients structs

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Yes, tests have been updated.

Did you document any new/modified feature?

Yes, api docs have been updated for the changes

Notes

@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.17%. Comparing base (28fc973) to head (f64616b).

Files with missing lines Patch % Lines
users/api/grpc/server.go 0.00% 8 Missing ⚠️
clients/events/events.go 0.00% 3 Missing and 3 partials ⚠️
clients/postgres/clients.go 92.30% 2 Missing and 2 partials ⚠️
users/api/grpc/client.go 0.00% 4 Missing ⚠️
users/postgres/users.go 91.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3155       +/-   ##
===========================================
+ Coverage   53.21%   79.17%   +25.96%     
===========================================
  Files         312      109      -203     
  Lines       32706    13203    -19503     
===========================================
- Hits        17405    10454     -6951     
+ Misses      14234     2132    -12102     
+ Partials     1067      617      -450     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@felixgateru felixgateru marked this pull request as ready for review September 29, 2025 08:45
@felixgateru felixgateru requested a review from a team as a code owner September 29, 2025 08:45
@felixgateru felixgateru force-pushed the smq3108-metadata branch 3 times, most recently from 3a95df7 to 37a317c Compare December 4, 2025 07:26
Copy link
Collaborator

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep it backward compatible and not break API, let's consider our Metadata private, and just add public one. I.e. we have metadata and publicMetadata fields. Private ones should not be visible even to superadmin, probably, but for now - let's just add public meta.

@felixgateru felixgateru force-pushed the smq3108-metadata branch 2 times, most recently from d31dca6 to 7253696 Compare January 19, 2026 10:45
@dborovcanin
Copy link
Collaborator

@felixgateru Please resolve conflicts.

Comment on lines +92 to +93
if uce.PublicMetadata != nil {
val["public_metadata"] = uce.PublicMetadata
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are not emitting metadata ?

Comment on lines 93 to 96
meta, ok := data["public_metadata"].(map[string]any)
if ok {
c.Metadata = meta
c.PublicMetadata = meta
}
Copy link
Contributor

@arvindh123 arvindh123 Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing metadata in decoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add public metadata to Users and Clients

3 participants